﻿using System.Data.Linq.Mapping;

namespace Jiubang.Authentications.Permissions {
    /// <summary>
    /// 对IPermissionInfo接口的默认实现
    /// </summary>
    [Table(Name = "Authentication_Permission")]
    public sealed class DbPermissionInfo : IDbPermissionInfo {
        #region IDbPermissionInfo Members

        /// <summary>
        /// 设置权限的路径
        /// </summary>
        [Column]
        public string Path { get; set; }

        /// <summary>
        /// 对当前路径执行的动作
        /// </summary>
        [Column]
        public string Action { get; set; }

        /// <summary>
        /// 部门访问权限（以位表示）
        /// </summary>
        [Column]
        public byte[] DepartmentCode { get; set; }

        /// <summary>
        /// 角色访问权限（以位表示）
        /// </summary>
        [Column]
        public byte[] RoleCode { get; set; }

        #endregion
    }
}